
function SendFeedback() {
    var now = new Date();
   var body = $("#feedbackbody").val();
    var fromemail = "info@mvccms.com";   
    var subject = "Feedback for MvcCms.com from " +$("#fromemail").val();
    var to = "info@mvccms.com";
    
    if (fromemail==""){
        alert("Email Is Required.");
        return false;
    }

    var data = { 
        Body: body,
        From: fromemail,
        Subject: subject,
        To: to,
     };
    var encoded = JSON.stringify(data);
    $.post(
		"/mvccmsAjax/FeedBack/" + now.getMilliseconds(),
	    { data: encoded },
	    function(data) {
	        var objdata = data;
	        if (objdata.error) {
	            //alert(objdata.error);
	        }
	        else {
	            alert("Your comments have been sent.");
	        }
	    },
	    "json"
    );
}

/*
sample module

<div>
<div style="text-align: center; width: 199px;">
<h4>To Contact The Site Type Your Message Below</h4>
</div>
<div style="width: 199px;"><textarea id="feedbackbody" style="width: 230px; height: 97px;" cols="2" name="feedbackbody"></textarea></div>
<div style="width: 199px;"><input id="fromemail" class="required" style="width: 230px;" type="text" value="email" /></div>
<div style="width: 199px;"><input id="sendfeedback" style="width: 230px;" onclick="SendFeedback();" type="button" value="Send Feedback" /></div>
</div>

*/
